<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="root">
        <h2>火车票购买</h2>
        <h2 v-show="flag1">上铺:399 <a href="#">立即购买</a></h2>
        <h2 v-show="flag2">中铺:299 <a href="#">立即购买</a></h2>
        <h2 v-show="flag3">下铺:199 <a href="#">立即购买</a></h2>
    </div>
    <script>
        new Vue({
            el:'#root',
            data() {
                return {
                    flag1:false,
                    flag2:false,
                    flag3:true,
                }
            },
        })
    </script>
</body>
</html>